import { createRouter, createWebHashHistory, createWebHistory } from "vue-router";
import Home from "@/components/Home.vue";
import TestPinia from "@/components/TestPinia.vue";
import InvokeRust from "@/components/InvokeRust.vue";
import NotFound from "@/components/NotFound.vue";

const router = createRouter({
	history: createWebHashHistory(),
	routes: [
		{
			path: "/home",
			name: "Home",
			component: () => import("@/components/Home.vue")
			// component: Home
		},
		{
			path: "/testPinia",
			name: "TestPinia",
			component: () => import("@/components/TestPinia.vue")
		},
		{
			path: "/invokeRust",
			name: "InvokeRust",
			component: () => import("@/components/InvokeRust.vue")
		},
    {
			path: "/",
			redirect: { name: "Home" }
		},
		{ 
      path: "/:pathMatch(.*)", 
      name: "NotFound", 
      component: () => import("@/components/NotFound.vue")
      // component: NotFound
    }
	]
});


export default router;
